<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增热解析')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-analysis-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">热表型号：</label>
                <div class="col-sm-8">
                    <select id="typeId" name="typeId" class="form-control">
                        <option th:each="type:${types}" th:value="${type.typeId}" th:text="${type.typeName}" th:field="${typeId}"></option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">字段名称：</label>
                <div class="col-sm-8">
                    <input name="columnName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变量：</label>
                <div class="col-sm-8">
                    <select id="variable" name="variableName" class="form-control m-b"  th:with="type=${@dict.getType('variable')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">字段起始位：</label>
                <div class="col-sm-8">
                    <input name="columnStart" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段结束位：</label>
                <div class="col-sm-8">
                    <input name="columnEnd" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">字段排序：</label>
                <div class="col-sm-8">
                    <select id="columnOrder" name="columnOrder" class="form-control m-b"  th:with="type=${@dict.getType('column_order')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段进制：</label>
                <div class="col-sm-8">
                    <select id="columnHex" name="columnHex" class="form-control m-b"  th:with="type=${@dict.getType('column_hex')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">字段单位位置：</label>
                <div class="col-sm-8">
                    <input name="columnUnit" class="form-control" type="text">
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label">字段系数：</label>
                <div class="col-sm-8">
                    <select id="columnCoefficient" name="columnCoefficient" class="form-control m-b"  th:with="type=${@dict.getType('column_coefficient')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">时间是否转换标志：</label>
                <div class="col-sm-8">
                    <select id="columnTime" name="columnTime" class="form-control m-b"  th:with="type=${@dict.getType('column_time')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>



        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "base/analysis"
        $("#form-analysis-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-analysis-add').serialize());
            }
        }
    </script>
</body>
</html>